package main

import (
	"blogx_server/utils/mps"
	"fmt"
)

type UserInfoUpdateRequest struct {
	Username    *string   `json:"username" s-u:"username"`
	Nickname    *string   `json:"nickname" s-u:"nickname"`
	Avatar      *string   `json:"avatar" s-u:"avatar"`
	Abstract    *string   `json:"abstract" s-u:"abstract"`
	LikeTags    *[]string `json:"likeTags" s-u-c:"like_tags"`
	OpenCollect *bool     `json:"openCollect" s-u-c:"open_collect"`
	OpenFollow  *bool     `json:"openFollow" s-u-c:"open_follow"`
	OpenFans    *bool     `json:"openFans" s-u-c:"open_fans"`
	HomeStyleID *uint     `json:"homeStyleID" s-u-c:"home_style_id"`
}

func main() {
	var name = "sam"
	var openCollect = true
	uinfo := UserInfoUpdateRequest{
		Username:    &name,
		OpenCollect: &openCollect,
	}

	fmt.Println(mps.StructToMap(uinfo, "s-u"))
	fmt.Println(mps.StructToMap(uinfo, "s-u-c"))

}
